<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>AdWords::Utils</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
    <script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
</head>

<body>     
    <div class="banner">
        <h1>
            <span class="type">Module</span> 
            AdWords::Utils 
            
        </h1>
        <ul class="files">
            
            <li><a href="../../files/lib/adwords4r/utils_rb.html">lib/adwords4r/utils.rb</a></li>
            
        </ul>
    </div>
    <div id="bodyContent">
        <div id="content">
    

    

    
    

    
    
    <div class="sectiontitle">Methods</div>
    <dl class="methods">
    
        <dt>G</dt>
        <dd>
            <ul>
                
                <li><a href="#method-c-get_categories">get_categories</a>,</li>
                
                <li><a href="#method-c-get_countries">get_countries</a>,</li>
                
                <li><a href="#method-c-get_currencies">get_currencies</a>,</li>
                
                <li><a href="#method-c-get_map">get_map</a>,</li>
                
                <li><a href="#method-c-get_operation_rates">get_operation_rates</a>,</li>
                
                <li><a href="#method-c-get_timezones">get_timezones</a>,</li>
                
                <li><a href="#method-c-get_us_cities">get_us_cities</a>,</li>
                
                <li><a href="#method-c-get_us_metros">get_us_metros</a>,</li>
                
                <li><a href="#method-c-get_world_cities">get_world_cities</a>,</li>
                
                <li><a href="#method-c-get_world_regions">get_world_regions</a></li>
                
            </ul>
        </dd>
    
    </dl>
    

    

    

    

    

    

    
            <div class="sectiontitle">Class Public methods</div>
            
            <div class="method">
                <div class="title" id="method-c-get_categories">
                    
                    <a name="method-c-get_categories"></a><b>get_categories</b>()
                    
                </div>
                
                <div class="description">
                  <p>
Retrieve list of available advertising categories.
</p>
<p>
Returns:
</p>
<ul>
<li><p>
list of lists. Columns: path, name
</p>
</li>
</ul>

                </div>
                
                
                
                
                <div class="sourcecode">
                    <p class="source-link">
                        Source: <a href="javascript:toggleSource('method-c-get_categories_source')" id="l_method-c-get_categories_source">show</a>
                        
                    </p>
                    <div id="method-c-get_categories_source" class="dyn-source">
                        <pre>    <span class="ruby-comment cmt"># File lib/adwords4r/utils.rb, line 35</span>
35:     <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_categories</span>
36:       <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_multiple_column_list</span>(<span class="ruby-value str">'categories.csv'</span>)
37:     <span class="ruby-keyword kw">end</span></pre>
                    </div>
                </div>
                
            </div>
            
            <div class="method">
                <div class="title" id="method-c-get_countries">
                    
                    <a name="method-c-get_countries"></a><b>get_countries</b>()
                    
                </div>
                
                <div class="description">
                  <p>
Retrieve list of available countries.
</p>
<p>
Returns:
</p>
<ul>
<li><p>
list of lists. Columns: country, code
</p>
</li>
</ul>

                </div>
                
                
                
                
                <div class="sourcecode">
                    <p class="source-link">
                        Source: <a href="javascript:toggleSource('method-c-get_countries_source')" id="l_method-c-get_countries_source">show</a>
                        
                    </p>
                    <div id="method-c-get_countries_source" class="dyn-source">
                        <pre>    <span class="ruby-comment cmt"># File lib/adwords4r/utils.rb, line 44</span>
44:     <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_countries</span>
45:       <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_multiple_column_list</span>(<span class="ruby-value str">'countries.csv'</span>)
46:     <span class="ruby-keyword kw">end</span></pre>
                    </div>
                </div>
                
            </div>
            
            <div class="method">
                <div class="title" id="method-c-get_currencies">
                    
                    <a name="method-c-get_currencies"></a><b>get_currencies</b>()
                    
                </div>
                
                <div class="description">
                  <p>
Retrieve list of available currencies.
</p>
<p>
Returns:
</p>
<ul>
<li><p>
list of lists. Columns: code, currency
</p>
</li>
</ul>

                </div>
                
                
                
                
                <div class="sourcecode">
                    <p class="source-link">
                        Source: <a href="javascript:toggleSource('method-c-get_currencies_source')" id="l_method-c-get_currencies_source">show</a>
                        
                    </p>
                    <div id="method-c-get_currencies_source" class="dyn-source">
                        <pre>    <span class="ruby-comment cmt"># File lib/adwords4r/utils.rb, line 53</span>
53:     <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_currencies</span>
54:       <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_multiple_column_list</span>(<span class="ruby-value str">'currencies.csv'</span>)
55:     <span class="ruby-keyword kw">end</span></pre>
                    </div>
                </div>
                
            </div>
            
            <div class="method">
                <div class="title" id="method-c-get_map">
                    
                    <a name="method-c-get_map"></a><b>get_map</b>(entries)
                    
                </div>
                
                <div class="description">
                  <p>
Gets a map from an array of map entries. A map entry is any object that has
a key and value field.
</p>
<p>
Args:
</p>
<ul>
<li><p>
entries: list of map entries
</p>
</li>
</ul>
<p>
Returns:
</p>
<ul>
<li><p>
hash constructed from map entries
</p>
</li>
</ul>

                </div>
                
                
                
                
                <div class="sourcecode">
                    <p class="source-link">
                        Source: <a href="javascript:toggleSource('method-c-get_map_source')" id="l_method-c-get_map_source">show</a>
                        
                    </p>
                    <div id="method-c-get_map_source" class="dyn-source">
                        <pre>     <span class="ruby-comment cmt"># File lib/adwords4r/utils.rb, line 120</span>
120:     <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_map</span>(<span class="ruby-identifier">entries</span>)
121:       <span class="ruby-identifier">map</span> = {}
122:       <span class="ruby-identifier">entries</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span>
123:         <span class="ruby-identifier">map</span>[<span class="ruby-identifier">entry</span>.<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">value</span>
124:       <span class="ruby-keyword kw">end</span>
125:       <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">map</span>
126:     <span class="ruby-keyword kw">end</span></pre>
                    </div>
                </div>
                
            </div>
            
            <div class="method">
                <div class="title" id="method-c-get_operation_rates">
                    
                    <a name="method-c-get_operation_rates"></a><b>get_operation_rates</b>()
                    
                </div>
                
                <div class="description">
                  <p>
Retrieve list of <a href="API.html">API</a> operation rates.
</p>
<p>
Returns:
</p>
<ul>
<li><p>
list of lists. Columns: service, method, rate, per_item
</p>
</li>
</ul>

                </div>
                
                
                
                
                <div class="sourcecode">
                    <p class="source-link">
                        Source: <a href="javascript:toggleSource('method-c-get_operation_rates_source')" id="l_method-c-get_operation_rates_source">show</a>
                        
                    </p>
                    <div id="method-c-get_operation_rates_source" class="dyn-source">
                        <pre>     <span class="ruby-comment cmt"># File lib/adwords4r/utils.rb, line 107</span>
107:     <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_operation_rates</span>
108:       <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_multiple_column_list</span>(<span class="ruby-value str">'ops_rates.csv'</span>)
109:     <span class="ruby-keyword kw">end</span></pre>
                    </div>
                </div>
                
            </div>
            
            <div class="method">
                <div class="title" id="method-c-get_timezones">
                    
                    <a name="method-c-get_timezones"></a><b>get_timezones</b>()
                    
                </div>
                
                <div class="description">
                  <p>
Retrieve list of available timezones.
</p>
<p>
Returns:
</p>
<ul>
<li><p>
simple list of timezone names
</p>
</li>
</ul>

                </div>
                
                
                
                
                <div class="sourcecode">
                    <p class="source-link">
                        Source: <a href="javascript:toggleSource('method-c-get_timezones_source')" id="l_method-c-get_timezones_source">show</a>
                        
                    </p>
                    <div id="method-c-get_timezones_source" class="dyn-source">
                        <pre>    <span class="ruby-comment cmt"># File lib/adwords4r/utils.rb, line 62</span>
62:     <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_timezones</span>
63:       <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_single_column_list</span>(<span class="ruby-value str">'timezones.csv'</span>)
64:     <span class="ruby-keyword kw">end</span></pre>
                    </div>
                </div>
                
            </div>
            
            <div class="method">
                <div class="title" id="method-c-get_us_cities">
                    
                    <a name="method-c-get_us_cities"></a><b>get_us_cities</b>()
                    
                </div>
                
                <div class="description">
                  <p>
Retrieve list of available US cities.
</p>
<p>
Returns:
</p>
<ul>
<li><p>
list of lists. Columns: state, code
</p>
</li>
</ul>

                </div>
                
                
                
                
                <div class="sourcecode">
                    <p class="source-link">
                        Source: <a href="javascript:toggleSource('method-c-get_us_cities_source')" id="l_method-c-get_us_cities_source">show</a>
                        
                    </p>
                    <div id="method-c-get_us_cities_source" class="dyn-source">
                        <pre>    <span class="ruby-comment cmt"># File lib/adwords4r/utils.rb, line 71</span>
71:     <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_us_cities</span>
72:       <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_multiple_column_list</span>(<span class="ruby-value str">'us_cities.csv'</span>)
73:     <span class="ruby-keyword kw">end</span></pre>
                    </div>
                </div>
                
            </div>
            
            <div class="method">
                <div class="title" id="method-c-get_us_metros">
                    
                    <a name="method-c-get_us_metros"></a><b>get_us_metros</b>()
                    
                </div>
                
                <div class="description">
                  <p>
Retrieve list of available US metropolitan areas.
</p>
<p>
Returns:
</p>
<ul>
<li><p>
list of lists. Columns: state, metro, code
</p>
</li>
</ul>

                </div>
                
                
                
                
                <div class="sourcecode">
                    <p class="source-link">
                        Source: <a href="javascript:toggleSource('method-c-get_us_metros_source')" id="l_method-c-get_us_metros_source">show</a>
                        
                    </p>
                    <div id="method-c-get_us_metros_source" class="dyn-source">
                        <pre>    <span class="ruby-comment cmt"># File lib/adwords4r/utils.rb, line 80</span>
80:     <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_us_metros</span>
81:       <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_multiple_column_list</span>(<span class="ruby-value str">'us_metros.csv'</span>)
82:     <span class="ruby-keyword kw">end</span></pre>
                    </div>
                </div>
                
            </div>
            
            <div class="method">
                <div class="title" id="method-c-get_world_cities">
                    
                    <a name="method-c-get_world_cities"></a><b>get_world_cities</b>()
                    
                </div>
                
                <div class="description">
                  <p>
Retrieve list of available world cities.
</p>
<p>
Returns:
</p>
<ul>
<li><p>
list of lists. Columns: country, code
</p>
</li>
</ul>

                </div>
                
                
                
                
                <div class="sourcecode">
                    <p class="source-link">
                        Source: <a href="javascript:toggleSource('method-c-get_world_cities_source')" id="l_method-c-get_world_cities_source">show</a>
                        
                    </p>
                    <div id="method-c-get_world_cities_source" class="dyn-source">
                        <pre>    <span class="ruby-comment cmt"># File lib/adwords4r/utils.rb, line 89</span>
89:     <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_world_cities</span>
90:       <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_multiple_column_list</span>(<span class="ruby-value str">'world_cities.csv'</span>)
91:     <span class="ruby-keyword kw">end</span></pre>
                    </div>
                </div>
                
            </div>
            
            <div class="method">
                <div class="title" id="method-c-get_world_regions">
                    
                    <a name="method-c-get_world_regions"></a><b>get_world_regions</b>()
                    
                </div>
                
                <div class="description">
                  <p>
Retrieve list of available world regions.
</p>
<p>
Returns:
</p>
<ul>
<li><p>
list of lists. Columns: country, code, region
</p>
</li>
</ul>

                </div>
                
                
                
                
                <div class="sourcecode">
                    <p class="source-link">
                        Source: <a href="javascript:toggleSource('method-c-get_world_regions_source')" id="l_method-c-get_world_regions_source">show</a>
                        
                    </p>
                    <div id="method-c-get_world_regions_source" class="dyn-source">
                        <pre>     <span class="ruby-comment cmt"># File lib/adwords4r/utils.rb, line 98</span>
 98:     <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_world_regions</span>
 99:       <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">get_multiple_column_list</span>(<span class="ruby-value str">'world_regions.csv'</span>)
100:     <span class="ruby-keyword kw">end</span></pre>
                    </div>
                </div>
                
            </div>
            
</div>
    </div>
  </body>
</html>    